class Solution {//leetcode187--重复的DNA序列
public:
    vector<string> findRepeatedDnaSequences(string s) {
        vector<string> ret;
        if(s.size()<10) return ret;
        unordered_map<string,int> sub_str_map;
        for(int i=0;i<=s.size()-10;i++)
        {
            string substr=s.substr(i,10);
            sub_str_map[substr]++;
        }
        for(auto& e:sub_str_map)
        {
            if(e.second>=2)
                ret.push_back(e.first);
        }

        return ret;
    }
};